<template>
	<!-- 弹出可输入文字的对话框 -->
	<view id="bohui" v-show="isShow">
		<view id="confrimBox">
			<view class="header">
				<text>{{title}}</text>
			</view>
			<view class="content">
				
				<view class="query-input">
					<input type="text" v-model="value1" placeholder="物资单号" />
				</view>
				<view class="query-input">
					<input type="text" v-model="value2" placeholder="物资名称" />
				</view>
				<view class="query-input">
					<input type="text" v-model="value3" placeholder="物资规格" />
				</view>
				<!-- <view class="query-row">
					<view class="query-input">
						<input type="text" v-model="" placeholder="物资单号" />
					</view>
				</view> -->
				
				
			</view>
				
			<view class="footer">
				<view @click="hide" class="cancel rightBorder">取消</view>
				<view @click="define" class="enter">确定</view>
			</view>
		</view>
	</view>
</template>

<script>
	// 
	export default {
		props:{
			isShow:{
				type:Boolean,
				default(){
					return false
				}
			},
			title:{
				type:String,
				default(){
					return "请输入"
				}
			}
		
		},
		data() {
			return {
				value1: "" ,
				value2: "" ,
				value3: "" 
			};
		},
		methods:{
			hide(){
				this.$emit('cancelModal')
			},
			define(){
				this.hide();
				let a = {MATSPEC:this.value3,MATERIALNAME:this.value2,   VNAME:this.value2,  BILLNO:this.value1  } ;
				this.$emit('okModal',a);
				this.value1=''
				this.value2=''
				this.value3=''
			}
		}
	}
</script>

<style lang="scss" scoped>
	#bohui {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		z-index: 100;
		background-color: rgba(0, 0, 0, .5);
		// display: flex;
		// align-items: center;
		// justify-content: space-around;
	}
	#confrimBox {
		width: 85%;
		border-radius: 20rpx;
		background-color: #FFFFFF;
		overflow: hidden;
		// margin-top: -50vh;
		position: relative;
		top: 50%;
		left: 50%;
		transform: translate(-50%,-50%);
		.header{
			display: block;
			text-align: center;
			font-size: 32rpx;
			padding: 20rpx;
			border-bottom: 1rpx solid #f5f5f5;
			text{
				text-align: center;
				font-size: 32rpx;
			}
		}
		.content{
			padding: 20rpx 60rpx 30rpx;
			uni-textarea{
				width: 100%;
				height: 120rpx;
				padding: 4rpx;
				font-size: 28rpx;
			}
			.query-input{
				margin: 40rpx 0;
				border-bottom: 1rpx solid #F1F1F1;
			}
			.query-input:focus-within {
				border-bottom: 1rpx solid #1677FF;
			}
		}
		.footer{
			display: flex;
			align-items: center;
			flex-wrap: nowrap;
			justify-content: space-between;
			border-top: 2rpx solid #f5f5f5;
			view{
				width: 50%;
				text-align: center;
				padding: 20rpx;
				font-size: 32rpx;
			}
			view:active{
				background-color: rgba($color: $uni-bg-color-grey, $alpha: 1);
			}
			.rightBorder{
				position: relative;
			}
			.rightBorder:after{
				content: "";
				width: 2rpx;
				height: 100%;
				background-color: $uni-bg-color-grey;
				position: absolute;
				top: 0;
				right: 0;
			}
			.cancel{
				color: $uni-text-color-grey;
			}
			.enter{
				color: $uni-color-primary;
			}
		}
	}
</style>
